package com.xiaoshuidi.cloud.module.rooms.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.equipmentStocktakingList.vo.EquipmentStocktakingListPageReqVO;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.equipmentStocktakingList.vo.EquipmentStocktakingListPageResp;
import com.xiaoshuidi.cloud.module.rooms.mapper.EquipmentStocktakingListMapper;
import com.xiaoshuidi.cloud.module.rooms.pojo.EquipmentStocktakingList;
import com.xiaoshuidi.cloud.module.rooms.repository.irepository.IEquipmentStocktakingListRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

/**
 * @Description
 * @Param
 * @Return
 * @Date 2023/5/21 17:20
 * @Author Link
 **/
@Repository
@RequiredArgsConstructor
public class EquipmentStocktakingListRepository extends ServiceImpl<EquipmentStocktakingListMapper, EquipmentStocktakingList> implements IEquipmentStocktakingListRepository {

    private final EquipmentStocktakingListMapper mapper;

    @Override
    public IPage<EquipmentStocktakingListPageResp> getEquipmentStocktakingListPage(EquipmentStocktakingListPageReqVO reqVO) {
        IPage<EquipmentStocktakingListPageResp> roomEquipmentPageRespIPage = mapper.getEquipmentStocktakingListPage(new Page<EquipmentStocktakingList>(reqVO.getPageNo(), reqVO.getPageSize()), reqVO);
        return roomEquipmentPageRespIPage;
    }
}
